#!/usr/bin/python
#-*- coding: utf-8 -*-


import MySQLdb

def db_object():
    info = {
        "host": "192.168.0.9",
        "port": 3306,
        "user": "root",
        "passwd": "p@ssw0rd",
        "db": "sso",
        "charset": "utf8"
    }

    try:
        conn = MySQLdb.connect(**info)
        cur = conn.cursor()
        return conn, cur

    except Exception, error:
        raise error